package com.nxj.sqlSession;

import com.nxj.pojo.Configuration;
import com.nxj.pojo.MappedStatement;

import java.util.List;

public interface Executor {

    <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;

    <E> E queryForObject(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;

    boolean insertOneObject(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;

    boolean deleteByCondition(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;

    int updateByCondition(Configuration configuration, MappedStatement mappedStatement, Object... params) throws Exception;

    void close() throws Exception;
}
